﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Ordinaire.Social
{
    /// <summary>
    /// Used to store a single address information.
    /// </summary>
    public class Address : Entity<int>, ILocation
    {
        #region Variables

        /// <summary>
        /// The error message when property method "Name" is called.
        /// </summary>
        private const string NamePropertyErrorMessage = "Not applicable";

        /// <summary>
        /// Unit number.
        /// </summary>
        private string unitNo;

        /// <summary>
        /// Block or street number.
        /// </summary>
        private string blockNo;

        /// <summary>
        /// Street name.
        /// </summary>
        private string streetName;

        /// <summary>
        /// Building name.
        /// </summary>
        private string buildingName;

        /// <summary>
        /// Suburb name.
        /// </summary>
        private string suburb;

        /// <summary>
        /// State name.
        /// </summary>
        private string state;

        /// <summary>
        /// Postal code.
        /// </summary>
        private string postCode;

        /// <summary>
        /// Country.
        /// </summary>
        private string country;

        #endregion

        #region Property methods

        /// <summary>
        /// Gets or sets the entry unique identifier.
        /// </summary>
        public override int Id
        {
            get { return base.Id; }
            set { base.Id = value; }
        }

        /// <summary>
        /// Gets or sets the entity name.
        /// </summary>
        /// <exception cref="System.NotImplementedException">Not applicable</exception>
        public override string Name
        {
            get { throw new NotImplementedException(NamePropertyErrorMessage); }
            set { throw new NotImplementedException(NamePropertyErrorMessage); }
        }

        /// <summary>
        /// Gets or sets the unit number.
        /// </summary>
        public string UnitNo
        {
            get { return this.unitNo; }
            set { this.unitNo = value; }
        }

        /// <summary>
        /// Gets or sets the block number for the specified street name.
        /// </summary>
        public string BlockNo
        {
            get { return this.blockNo; }
            set { this.blockNo = value; }
        }

        /// <summary>
        /// Gets or sets the street name.
        /// </summary>
        public string StreetName
        {
            get { return this.streetName; }
            set { this.streetName = value; }
        }

        /// <summary>
        /// Gets or sets the building name, if any.
        /// </summary>
        public string BuildingName
        {
            get { return this.buildingName; }
            set { this.buildingName = value; }
        }

        /// <summary>
        /// Gets or sets the suburb.
        /// </summary>
        public string Suburb
        {
            get { return this.suburb; }
            set { this.suburb = value; }
        }

        /// <summary>
        /// Gets or sets the state.
        /// </summary>
        public string State
        {
            get { return this.state; }
            set { this.state = value; }
        }

        /// <summary>
        /// Gets or sets the postal code.
        /// </summary>
        public string PostCode
        {
            get { return this.postCode; }
            set { this.postCode = value; }
        }

        /// <summary>
        /// Gets or sets the country.
        /// </summary>
        public string Country
        {
            get { return this.country; }
            set { this.country = value; }
        }

        #endregion
    }
}
